package org.github.choviwu.example.shiro;

import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.subject.SimplePrincipalCollection;

/**
 * Created by ChoviWu on 2018/05/07
 * Description: 重写验权
 */
public class MySimpleAuthenticationInfo extends SimpleAuthenticationInfo {


    public MySimpleAuthenticationInfo(Object principal, Object credentials, String realmName){

        this.principals = new SimplePrincipalCollection(principal, realmName);
        this.credentials = credentials;
    }

    public MySimpleAuthenticationInfo(){
        this.principals = new SimplePrincipalCollection();
        this.credentials = credentials;
    }
}
